<?php
!defined('P_W') && exit('Forbidden');
require_once MODE . '/base/frontcontroller.php';
/**
 * 二手房首页
 */
class indexController extends FrontController {
	var $_layoutFile = 'index';
	var $_seopage;
	var $_defaultSeo;
	var $_seoname;
	function run() {
		$saleService = House::LoadService('SecondSaleService');
		$this->_viewer->baseUrl = PW_HouseUrl::houseIndex();
		$this->_viewer->addSaleUrl = PW_HouseUrl::addSale();
		$this->_viewer->addHireUrl = PW_HouseUrl::addHire();
		$this->_viewer->manageUrl = PW_HouseUrl::manage();
		$this->_viewer->secondSaleUrl = PW_HouseUrl::secondSale();
		$this->_viewer->secondHireUrl = PW_HouseUrl::secondHire();
		$this->_viewer->checkinUrl = BASEURL.'q=checkin';;//居室
		$this->_viewer->area = $saleService->getFieldsByType('area');//区域
		$this->_viewer->hireprice = $saleService->getFieldsByType('rentprice');
		$this->_viewer->sellprice = $saleService->getFieldsByType('sellprice');//价格
		$this->_viewer->acreage = $saleService->getFieldsByType('acreage');//面积区间
		$this->_viewer->room = $saleService->roomType;//居室
		$this->_viewer->current['sale'] = 'class="current"';
	}
	
	function _after(){
		houseSeoSettings($this->_seopage,$this->_defaultSeo,$this->_seoname);
	}
}